<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>声明自定义对象</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .bord{
            border: 1px dashed #ee2602;
            width: 90%;
            margin: 20px auto;
        }
        .title{
            font-size: 20px;
            font-weight: bold;
            margin: 20px;
        }
        .introduce{
            font-size: 16px;
            margin: 0 0 20px 50px;
        }
        .red{
            color: red;
        }
    </style>
</head>
<body>
<div class="bord">
    <div class="title">声明自定义对象</div>
    <div class="introduce">
        var obj1 = new Object();<br/>
        var obj2 = new fun();<br/>
        var obj3 = {};//json   javascript的原生数据对象  主要用于数据传输<br/>
    </div>
</div>
<div class="bord">
    <div class="title">演示效果</div>
    <div class="introduce">
        <a href = 'jsonprovince.html'>效果</a>
    </div>
</div>
<div class="bord">
    <div class="title">代码</div>
    <div class="introduce">
        <pre>
             var data = {
            'HN':{
                name : '湖南省',
                child : {
                    'CS': {
                        name : '长沙市',
                        child : {
                            'YY':{name:'岳麓区'},
                            'YH':{name:'雨花区'},
                            'FR':{name:'芙蓉区'},
                            'TX':{name:'天心区'},
                            'KF':{name:'开福区'}
                        }
                    },
                    'ZZ': {
                        name : '株洲市',
                        child : {
                            'HT':{name:'荷塘区'},
                            'SF':{name:'石峰区'},
                            'TY':{name:'天元区'},
                            'LS':{name:'芦淞区'}
                        }
                    }
                }
            },
            'GD':{
                name : '广东省',
                child : {
                    'GZ': {
                        name : '广州市',
                        child : {
                            'YX':{name:'越秀区'},
                            'HZ':{name:'海珠区'},
                            'TH':{name:'天河区'},
                            'LW':{name:'荔湾区'},
                            'HD':{name:'花都区'},
                            'HP':{name:'黄埔区'},
                            'BY':{name:'白云区'}
                        }
                    },
                    'SZ': {
                        name : '深圳市',
                        child : {
                            'LF':{name:'罗湖区'},
                            'FT':{name:'福田区'},
                            'NS':{name:'南山区'},
                            'BA':{name:'宝安区'},
                            'LG':{name:'龙岗区'},
                            'YT':{name:'盐田区'}
                        }
                    }
                }
            }
        };
        </pre>
    </div>
</div>
</body>
</html>